package com.sgj.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sgj.common.utils.PageUtils;
import com.sgj.gulimall.product.entity.SpuInfoDescEntity;
import com.sgj.gulimall.product.entity.SpuInfoEntity;
import com.sgj.gulimall.product.vo.SpuSaveVo;

import java.util.Map;

/**
 * spu信息
 *
 * @author guojishen
 * @email 1261550408@qq.com
 * @date 2021-06-11 14:21:46
 */
public interface SpuInfoService extends IService<SpuInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 保存spu及sku信息
     * @param spuSaveVo
     */
    void saveSpuInfo(SpuSaveVo spuSaveVo);

    /**
     * 保存spu基本信息
     * @param spuInfoEntity
     */
    void saveBaseSpuInfo(SpuInfoEntity spuInfoEntity);

    /**
     * 根据条件分页查询
     * @param params
     * @return
     */
    PageUtils queryPageByCondition(Map<String, Object> params);

    /**
     * 商品上架
     * @param spuId
     */
    void up(Long spuId);

    /**
     * 根据skuId查询商品
     * @param skuId
     * @return
     */
    SpuInfoEntity getSpuInfoBySkuId(Long skuId);
}

